package cn.highedu.feignclient.demos;

import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignDemoController {

    Logger logger = org.slf4j.LoggerFactory.getLogger(FeignDemoController.class);

    @Autowired
    private HelloService helloService;

    @GetMapping("/feign/hello/{name}")
    public String hello(@PathVariable String name) {
        logger.info("feignClient name: {}", name);
        return helloService.hello(name);
    }

}
